<div class="x_panel">
  <div class="x_content" style="display: block;">
    <!--表格主体内容-->
    <div class="nav navbar-right panel_toolbox">
      <a class="fa fa-plus" href="/banner/add.html"> 添加</a>
    </div>
    <br><br>
    <div class="row-fluid">
      <form action="/banner/index.html" method="get">
        <label class="control-label">板块</label>
        <select  class="form-control-new" name="form[banner_type]" >
          <option {if !isset($query.banner_type) || $query.banner_type==0}selected="selected"{/if} value="0">全部</option>
          <option {if isset($query.banner_type) && $query.banner_type==1}selected="selected"{/if} value="1">美文欣赏</option>
          <option {if isset($query.banner_type) && $query.banner_type==2}selected="selected"{/if} value="2">国际游学</option>
          <option {if isset($query.banner_type) && $query.banner_type==3}selected="selected"{/if} value="3">海淘图书馆</option>
          <option {if isset($query.banner_type) && $query.banner_type==4}selected="selected"{/if} value="4">淘转课堂</option>
          <option {if isset($query.banner_type) && $query.banner_type==5}selected="selected"{/if} value="5">YCT</option>
          <option {if isset($query.banner_type) && $query.banner_type==6}selected="selected"{/if} value="6">HSK</option>
          <option {if isset($query.banner_type) && $query.banner_type==7}selected="selected"{/if} value="7">西语日常</option>
          <option {if isset($query.banner_type) && $query.banner_type==8}selected="selected"{/if} value="8">少儿西语</option>
          <option {if isset($query.banner_type) && $query.banner_type==9}selected="selected"{/if} value="9">DELE</option>
        </select>
        <button type="submit" class="btn btn-primary" style="">搜索</button>
      </form>
    </div>
    <br><br>
    <div class="cont">
      <table class="table table-bordered table-striped">
        <thead>
        <tr>
          <th width="100px">序号</th>
          <th>板块</th>
          <th>标题</th>
          <th>创建时间</th>
          <th>操作</th>
        </tr>
        </thead>
        <tbody>
        {foreach $banner.lists as $banneritem}
        <tr>
          <td>{$banneritem.banner_id}</td>
          <td>
            {if $banneritem.banner_type==1}
            美文欣赏
            {elseif $banneritem.banner_type==2}
            国际游学
            {elseif $banneritem.banner_type==3}
            海淘图书馆
            {elseif $banneritem.banner_type==4}
            淘转课堂
            {elseif $banneritem.banner_type==5}
            YCT
            {elseif $banneritem.banner_type==6}
            HSK
            {elseif $banneritem.banner_type==7}
            西语日常
            {elseif $banneritem.banner_type==8}
            少儿西语
            {elseif $banneritem.banner_type==9}
            DELE
            {/if}
          </td>
          <td>{$banneritem.banner_title}</td>
          <td>{$banneritem.add_time}</td>
          <td>
            <div class="x_content">
              <a class="btn btn-primary btn-xs" href="{eval U(['banner/edit','banner_id'=>$banneritem.banner_id])}"> 编辑</a>
              <button class="btn btn-danger btn-xs" data-toggle="dropdown">删除
                <i class="icon-angle-down"></i></button>
              <ul class="dropdown-menu">
                <li><a href="{eval U(['banner/delete','banner_id'=>$banneritem.banner_id])}">确定</a></li>
                <li><a href="javascript:;">取消</a></li>
              </ul>
            </div>
          </td>
        </tr>
        {/foreach}
        </tbody>
      </table>
      <!--分页-->

      {Yii::$app->view->render('/com/pager.php',['pager'=>$banner['pager']])}
    </div>
  </div>
</div>

